<?php
require_once("dao/DAOFactory.php");
require_once("dao/PhotoDAO.php");


?>
<html>
<body>
<h3>Testing PhotoDAO</h3>
<?
$photoDao = DAOFactory::getDAO("photo");
?>
<ul>
	<li>
		Testing getItem<br/>
		<?
			$result = $photoDao->getItem(1);
			echo ($result != null && $result->photoId != null)?"returned an object":"returned null.";
			echo "<br/>";
		?>	
	</li>
	<!--
	<li>item2</li>
	<li>item2</li>
	<li>item2</li>
	-->
</ul>

<h3>Testing CourseDAO</h3>
<?
$courseDao = DAOFactory::getDAO("course");
?>
<ul>
	<li>
		Testing getItem<br/>
		<?
			$result = $courseDao->getItem(1);
			echo ($result != null && $result->courseid != null)?"failed":"succeeded";
			echo "<br/>";
		?>	
	</li>
	<li>item2</li>
	<li>item2</li>
	<li>item2</li>
</ul>
</body>
</html>